function dragTest() {
    var droptarget = document.getElementById("droptarget");
    droptarget.innerHTML = "drag something in";
    EventUtil.addHandler(droptarget, "dragover", function (event) {
        EventUtil.preventDefault(event);
    });
    EventUtil.addHandler(droptarget, "dragenter", function (event) {
        EventUtil.preventDefault(event);
    });
    EventUtil.addHandler(droptarget, "drop", function (event) {
        var dataTransfer = event.dataTransfer;
        //读取URL
        var url = dataTransfer.getData("url") || dataTransfer.getData("text/uri-list");
        //读取文本
        var text = dataTransfer.getData("Text");
        console.log(text);
    });
}

//取得元素的引用
var player = document.getElementById("audioPlayer"),
    btn = document.getElementById("audio-btn"),
    curtime = document.getElementById("audioCurtime"),
    duration = document.getElementById("audioDuration");
//更新播放时间
duration.innerHTML = player.duration;
//为按钮添加事件处理程序
EventUtil.addHandler(btn, "click", function(event){
    if (player.paused){
        player.play();
        btn.value = "Pause";
    } else {
        player.pause();
        btn.value = "Play";
    }
});
//定时更新当前时间
setInterval(function(){
    curtime.innerHTML = player.currentTime;
}, 250);
